﻿using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 新增数组请求参数
    /// </summary>
    public class AddSiteParam
    {
        /// <summary>
        /// 分组ID
        /// </summary>
        [JsonProperty("group_id"), JsonPropertyName("group_id")]
        [Required(ErrorMessage = nameof(ErrorResultEnum.GroupIdIsNull))]
        public long GroupId { get; set; }


        /// <summary>
        /// 用户id
        /// </summary>
        [JsonProperty("member_id"), JsonPropertyName("member_id")]
        [Required(ErrorMessage = nameof(ErrorResultEnum.MemberIdIsNull))]
        public long MemberId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [JsonProperty("name"), JsonPropertyName("name")]
        [Required(ErrorMessage = nameof(ErrorResultEnum.NameIsNull))]
        public string Name { get; set; }
    }
}
